import requestService from "../service/request";

const Api = {
  list: "/film/cinema/getCinemaList",
  listByMovie: "/film/cinema/getFilmList",
  detail: "/film/cinema/getShowList",
  arrangement: "/film/cinema/getCinemaShowListByCinemaIdAndFilmId",
  seat: "/film/cinema/getSeatListByShowIdForOrderV2",
  CinemaListByMovie: "/film/cinema/getCinemaList",
  ArrangeMent: "/film/cinema/getCinemaShowListByCinemaId",
  fimlList: "/film/cinema/getFilmListByCinemaId",
  line: "/film/cinema/getCinemaLine",
  arrangementBycdf: "/film/cinema/getCinemaShowWithCinemaAndFilmList",
  cinemaDate: "/film/cinema/getFilmSchedulingByFilmIdAndCityId",
};

//获取影院列表
export function list(data) {
  return requestService(Api.list, {
    type: "post",
    data,
  });
}

//获取电影列表
export function listByMovie(data) {
  return requestService(Api.listByMovie, {
    type: "get",
    data,
    paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//影院排期的电影数据 影院的场次信息
export function detail(data) {
  return requestService(Api.detail, {
    type: "get",
    data,
  });
}

//影院的电影场次数据
export function arrangement(data) {
  return requestService(Api.arrangement, {
    type: "get",
    data,
    paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//影院的电影场次座位数据
export function seat(data) {
  return requestService(Api.seat, {
    type: "get",
    data,
    paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//根据电影ID 日期 城市Id 获取当前的对应的影院列表

export function cinemaList(data) {
  return requestService(Api.CinemaListByMovie, {
    type: "post",
    data,
  });
}

//获取场次信息 根据电影Id 城市Id
export function ArrangeMents(data) {
  return requestService(Api.ArrangeMent, {
    type: "get",
    data,
    paramsFormdata: "application/x-www-form-urlencoded",
  });
}

// 拆分
// 通过影院Id 获取电影列表

export function getFilmListByCinemaId(data) {
  return requestService(Api.fimlList, {
    type: "post",
    data,
    paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//获取院线列表
export function getCinemaLineList() {
  return requestService(Api.line, {
    type: "post",
    // paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//获取场次 列表 接口 根据 时间 日期 电影Id  影院Id

export function getCinemaAggrementByCDF(data) {
  return requestService(Api.arrangementBycdf, {
    type: "post",
    data,
    // paramsFormdata: "application/x-www-form-urlencoded",
  });
}

//获取电影的信息日期 之前白屏问题接口

export function getMovieDateByid(data) {
  return requestService(Api.cinemaDate, {
    type: "post",
    data,
    // paramsFormdata: "application/x-www-form-urlencoded",
  });
}
